package cn.hyh.config;

import cn.hyh.service.UserService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;

/**
 * @auther :hyh
 * @desc :
 * @date :2020/1/6
 */
@Configuration                                          //建立在使用默认的filters 基础之上，在排除掉@controller
@ComponentScan(basePackages = "cn.hyh.service",useDefaultFilters =true,excludeFilters = {@ComponentScan.Filter(Controller.class)})
public class SpringParentConfig {

	@Bean
	public UserService  userService(){
		return new UserService();
	}
}
